<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQuestionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('questions', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->integer('user_id')->unsigned();
            $table->integer('cate_id')->default(0);
            $table->text('content');
            $table->string('desc')->default('');
            $table->integer('kiss')->default(100);
            $table->integer('answer_num')->default(0);
            $table->integer('view_num')->default(0);
            $table->tinyInteger('status')->default(0)->comment('0未结 1已结');
            $table->tinyInteger('is_jing')->default(0)->comment("0没精  1精品");
            $table->tinyInteger('is_top')->default(0)->comment("0不置顶  1置顶");
            $table->tinyInteger('wenxin')->default(0)->comment("0没有  1温馨通道");
            $table->timestamps();
        });
    }
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('questions');
    }
}
